import ElementPlus from "element-plus"
import "element-plus/dist/index.css"
import "element-plus/theme-chalk/dark/css-vars.css"
import * as ElementPlusIconsVue from "@element-plus/icons-vue"
import { App } from "vue"

export default {
    install: (app: App, cfg: elementCFG = { 注册图标否: true }) => {
        app.use(ElementPlus)

        // 注册全部el-icon图标
        if (cfg.注册图标否) {
            for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
                // console.log(`key 👉`,key)
                // console.log(`component 👉`,component)
                app.component(key, component)
            }
        }
    },
}
